<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path;
    String LoginInfo = (String)request.getSession().getAttribute("LoginInfo");
    if(LoginInfo == null) {
%>    	
    	<script type="text/javascript" language="javascript">
    	 alert("还未进行登录");                                            // 弹出错误信息

    	 window.location='index.jsp' ;                            // 跳转到登录界面
    	 </script> 
<%
    	 }else{
%>    	
        <script type="text/javascript" language="javascript">
        alert("<%=LoginInfo%>");                                            //登录成功提示
        </script> 
<%
        	 }
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<style type="text/css">
	.row-fluid{
		display: flex;
		flex-direction: row;
	}
	.span10{
		border: 1px;
		width: 900px;
		height: 180px;
	}
	.span2{
		width: 200px;
		height: 250px;
	}
</style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="<%=path%>/bootstrap/js/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="<%=path%>/bootstrap/js/jquery-3.4.1.js"></script>
<link href="http://cdn.bootcss.com/twitter-bootstrap/2.2.2/css/bootstrap.min.css" rel="stylesheet">
<link href="http://www.bootcss.com/p/bootstrap-datetimepicker/bootstrap-datetimepicker/css/datetimepicker.css" rel="stylesheet">
<script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="http://www.bootcss.com/p/bootstrap-datetimepicker/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<title>游艇俱乐部管理系统</title>
</head>
<body>
	<div class="container-fluid" style="padding-right: 0px;padding-left: 0px;">
		<div region="north" style="height: 100px;background-image: url('<%=path%>/image/background2.jpg') ;">
			<div align="left" style="width: 80%;height: 100px;float: left;padding-top: 40px;padding-left: 20px;"></div>
			<div style="padding-top: 70px;padding-right: 20px;font-size: 16px;">
				当前用户：&nbsp;<font color="red">${session_user.name}</font>
			</div>
		</div>
	</div>

	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span2 bs-docs-sidebar">
				<ul class="nav nav-list bs-docs-sidenav">
					<!-- 超级管理员 -->
					<c:if test="${session_user.roleId == 0}">
						<li><a href="<%=path%>/index.action"><i class="icon-chevron-right"></i>首页</a></li>
						<li id="comsume"><a href="<%=path%>/comsume。action?action=list"><i class="icon-chevron-right"></i>消费记录管理</a></li>
						<li id="member"><a href="<%=path%>/member.action?action=list"><i class="icon-chevron-right"></i>会员管理</a></li>
						<li id="waiter"><a href="<%=path%>/waiter.action?action=list"><i class="icon-chevron-right"></i>服务员管理</a></li>
						<li id="manager"><a href="<%=path%>/manager.action?action=list"><i class="icon-chevron-right"></i>经理管理</a></li>
						<li id="yacht"><a href="<%=path%>/yacht.action?action=list"><i class="icon-chevron-right"></i>游艇管理</a></li>
						<li id="point"><a href="<%=path%>/point.action?action=list"><i class="icon-chevron-right"></i>积分管理</a></li>
						<li id="active"><a href="<%=path%>/active.action?action=list"><i class="icon-chevron-right"></i>活动管理</a></li>
						<li id="gift"><a href="<%=path%>/gift.action?action=list"><i class="icon-chevron-right"></i>礼品记录</a></li>
						<li id="record"><a href="<%=path%>/record.action?action=list"><i class="icon-chevron-right"></i>缺勤记录</a></li>
						<li id="passWord"><a href="<%=path%>/password.action?action=preChange"><i class="icon-chevron-right"></i>修改密码</a></li>
						<li id="loginOut"><a href="<%=path%>/loginOut.action"><i class="icon-chevron-right"></i>退出系统</a></li>
					</c:if>
					<!-- 经理 -->
					<c:if test="${session_user.roleId == 1}">
						<li><a href="index.action"><i class="icon-chevron-right"></i>首页</a></li>
						<li id="comsume"><a href="<%=path%>/comsume.action?action=list"><i class="icon-chevron-right"></i>消费记录管理</a></li>
						<li id="member"><a href="<%=path%>/member.action?action=list"><i class="icon-chevron-right"></i>会员管理</a></li>
						<li id="waiter"><a href="<%=path%>/waiter.action?action=list"><i class="icon-chevron-right"></i>服务员管理</a></li>
						<li id="yacht"><a href="<%=path%>/yacht.action?action=list"><i class="icon-chevron-right"></i>游艇管理</a></li>
						<li id="point"><a href="<%=path%>/point.action?action=list"><i class="icon-chevron-right"></i>积分管理</a></li>
						<li id="active"><a href="<%=path%>/active.action?action=list"><i class="icon-chevron-right"></i>活动管理</a></li>
						<li id="gift"><a href="<%=path%>/gift.action?action=list"><i class="icon-chevron-right"></i>礼品记录</a></li>
						<li id="record"><a href="<%=path%>/record.action?action=list"><i class="icon-chevron-right"></i>缺勤管理</a></li>
						<li id="passWord"><a href="<%=path%>/password.action?action=preChange"><i class="icon-chevron-right"></i>修改密码</a></li>
						<li id="loginOut"><a href="<%=path%>/loginOut.action"><i class="icon-chevron-right"></i>退出系统</a></li>
					</c:if>
					<!-- 服务员 -->
					<c:if test="${session_user.roleId == 2}">
						<li><a href="index.action"><i class="icon-chevron-right"></i>首页</a></li>
						<li id="comsume"><a href="<%=path%>/comsume.action?action=list"><i class="icon-chevron-right"></i>消费记录管理</a></li>
						<li id="member"><a href="<%=path%>/member.action?action=list"><i class="icon-chevron-right"></i>会员管理</a></li>
						<li id="yacht"><a href="<%=path%>/yacht.action?action=list"><i class="icon-chevron-right"></i>游艇管理</a></li>
						<li id="point"><a href="<%=path%>/point.action?action=list"><i class="icon-chevron-right"></i>积分管理</a></li>
						<li id="active"><a href="<%=path%>/active.action?action=list"><i class="icon-chevron-right"></i>活动管理</a></li>
						<li id="gift"><a href="<%=path%>/gift.action?action=list"><i class="icon-chevron-right"></i>礼品记录</a></li>
						<li id="record"><a href="<%=path%>/record.action?action=list"><i class="icon-chevron-right"></i>缺勤记录</a></li>
						<li id="passWord"><a href="<%=path%>/password.action?action=preChange"><i class="icon-chevron-right"></i>修改密码</a></li>
						<li id="loginOut"><a href="<%=path%>/loginOut.action"><i class="icon-chevron-right"></i>退出系统</a></li>
					</c:if>
					<!-- 会员 -->
					<c:if test="${session_user.roleId == 3}">
						<li><a href="index.action"><i class="icon-chevron-right"></i>首页</a></li>
						<li id="comsume"><a href="<%=path%>/comsume/list"><i class="icon-chevron-right"></i>消费记录</a></li>
						<li id="yacht"><a href="<%=path%>/yacht.action?action=list"><i class="icon-chevron-right"></i>浏览游艇</a></li>
						<li id="point"><a href="<%=path%>/point.action?action=list"><i class="icon-chevron-right"></i>查询积分</a></li>
						<li id="active"><a href="<%=path%>/active.action?action=list"><i class="icon-chevron-right"></i>浏览活动</a></li>
						<li id="gift"><a href="<%=path%>/gift.action?action=list"><i class="icon-chevron-right"></i>礼品记录</a></li>
						<li id="passWord"><a href="<%=path%>/password.action?action=preChange"><i class="icon-chevron-right"></i>修改密码</a></li>
						<li id="loginOut"><a href="<%=path%>/loginOut.action"><i class="icon-chevron-right"></i>退出系统</a></li>
					</c:if>
					<!-- 维修工  -->
					<c:if test="${session_user.roleId == 4}">
						<li><a href="index.action"><i class="icon-chevron-right"></i>首页</a></li>
						<li id="comsume"><a href="<%=path%>/comsume/list"><i class="icon-chevron-right"></i>消费记录</a></li>
						<li id="yacht"><a href="<%=path%>/yacht.action?action=list"><i class="icon-chevron-right"></i>浏览游艇</a></li>
						<li id="point"><a href="<%=path%>/point.action?action=list"><i class="icon-chevron-right"></i>查询积分</a></li>
						<li id="active"><a href="<%=path%>/active.action?action=list"><i class="icon-chevron-right"></i>浏览活动</a></li>
						<li id="gift"><a href="<%=path%>/gift.action?action=list"><i class="icon-chevron-right"></i>礼品记录</a></li>
						<li id="passWord"><a href="<%=path%>/password.action?action=preChange"><i class="icon-chevron-right"></i>修改密码</a></li>
						<li id="loginOut"><a href="<%=path%>/loginOut.action"><i class="icon-chevron-right"></i>退出系统</a></li>
					</c:if>
				</ul>
			</div>
				<div class="span10">
					<jsp:include page="${mainRight==null?'blank.jsp':mainRight}"></jsp:include>
				</div>
		</div>
	</div>
</body>
</html>